翻訳と辞書
Words near each other
・ Leangen Ishall
・ Leangen Station
・ Leangen Travbane
・ Leanid Karneyenka
・ Leanid Lahun
・ Leanid Marakou
・ Leanin' on Slick
・ Leanin' Tree Museum of Western Art
・ Leaning House
・ Leaning Juniper Wind Project
・ Leaning Oak, Roane County, West Virginia
・ Leaning on a Lamp-post
・ Leaning on the Everlasting Arms
・ Leaning Pine Arboretum
・ Leaning Temple of Huma
Leaning toothpick syndrome
・ Leaning tower illusion
・ Leaning Tower of Nevyansk
・ Leaning Tower of Niles
・ Leaning Tower of Pisa
・ Leaning Tower of Suurhusen
・ Leaning Tower of Teluk Intan
・ Leaning Tower of Toruń
・ Leaning Tower of Zaragoza
・ Leaning Tower, Yosemite
・ Leanita McClain
・ Leanja
・ Leann Fennelly
・ Leann Hunley
・ LeAnn Rimes


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Leaning toothpick syndrome : ウィキペディア英語版
Leaning toothpick syndrome
In computer programming, leaning toothpick syndrome (LTS) is the situation in which a quoted expression becomes unreadable because it contains a large number of escape characters, usually backslashes ("\"), to avoid delimiter collision.
The official Perl documentation〔(perlop - perldoc.perl.org )〕 introduced the term to wider usage; there, the phrase is used to describe regular expressions that match Unix-style paths in which the elements are separated by slashes /. The slash is also used as the default regular expression delimiter which must be escaped with a ''back''slash, \, leading to frequent escaped slashes represented as \/. If doubled, as in URLs, this yields \/\/ for an escaped //. A similar phenomenon occurs for DOS/Windows paths, where the backslash is used as a path separator, requiring a doubled backslash \\ – this can then be ''re''-escaped for a regular expression inside an escaped string, requiring \\\\ to match a single backslash. In extreme cases, such as a regular expression in escaped string, matching a Uniform Naming Convention path (which begins \\) this requires 8 backslashes \\\\\\\\ due to 2 backslashes each being double-escaped.
LTS appears in many programming languages and in many situations, including in patterns that match Uniform Resource Identifiers (URIs) and in programs that output quoted text. Many quines fall into the latter category.
==Pattern example==
Consider the following Perl regular expression intended to match URIs which identify files under the pub directory of an FTP site:

m/ftp:\/\/()
*\/pub\//

Perl, like sed before it, solves this problem by allowing many other characters to be delimiters for a regular expression. For example, the following three examples are equivalent to the expression given above:


m
m#ftp://()
*/pub/#
m!ftp://()
*/pub/!


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Leaning toothpick syndrome」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.